﻿

#include "Test/Transform.h"

#include "GameFramework/GameSession.h"
#include "Kismet/GameplayStatics.h"


ATestTransform::ATestTransform()
{
	PrimaryActorTick.bCanEverTick = true;
}

void ATestTransform::BeginPlay()
{
	Super::BeginPlay();
	
	// UGameplayStatics::GetPlayerController(GetWorld(), 0);
	APlayerController* PlayerController = GetWorld()->GetFirstPlayerController();
	EnableInput(PlayerController);
}

void ATestTransform::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
}

void ATestTransform::SetLocation(const FVector& NewLocation, bool bOffset)
{
	if (bOffset)
	{
		AddActorLocalOffset(NewLocation);
	}else
	{
		SetActorLocation(NewLocation);
	}
}
